package com.wang.action;

import com.wang.entity.TbBbsCollect;
import com.wang.response.ResultResponse;
import com.wang.service.TbBbsCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/bbs")
public class BbscollectAction {
  @Autowired
    private TbBbsCollectService tbBbsCollectService;

    /*
  收藏
   */
    @PostMapping("insertcollect")
   private ResultResponse insertcollect(@RequestBody TbBbsCollect tbBbsCollect){
       return this.tbBbsCollectService.insertcollect(tbBbsCollect);
   }
    /*
     取消收藏
     */
    @PostMapping("removecollect/{collectId}")
    private ResultResponse removecollect(@PathVariable Integer collectId){
        return this.tbBbsCollectService.removecollect(collectId);
    }
    /*
     查询收藏
     */
    @PostMapping("findcollect")
   private ResultResponse findcollect(@RequestBody TbBbsCollect tbBbsCollect){
        return this.tbBbsCollectService.findcollect(tbBbsCollect);
    }
    /*
 查询收藏 全部
 */
    @PostMapping("findcollectall")
    private ResultResponse findcollectall(@RequestBody TbBbsCollect tbBbsCollect){
        return this.tbBbsCollectService.findcollectall(tbBbsCollect);
    }
}
